/*************************************************************************
	> File Name: oj-42_v2.cpp
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年12月29日 星期二 23时23分35秒
 ************************************************************************/
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, m;
    cin >> m >> n;
    vector<int> coins(m, 0);
    for (int i = 0; i < m; ++i) {
        cin >> coins[i];
    }
    vector<vector<int>> dp(m + 1, vector<int>(n + 1, 0));
    for (int i = 0; i <= m; ++i) {
        dp[i][0] = 1;
    }
    for (int i = 1; i <= m; ++i) {
        for (int j = 1; j <= n; ++j) {
            if (j >= coins[i - 1])
                dp[i][j] = dp[i - 1][j] + dp[i][j - coins[i - 1]];
            else 
                dp[i][j] = dp[i - 1][j];
            dp[i][j] %= 9973;
        }
    }
    cout << dp[m][n] << endl;
    return 0;
}
